package com.sbck.cs3.MyClass;

import android.graphics.Color;

public class TChState {
    public float TotalTime;
    public int Status;          /* 0待测试 ;1可点火 ;2待点火 ;3不可用 ;4已点火 ;*/
    public Color StartColor;
    public Color EndColor;
    public boolean Check;
    public int Index;
    public float Percent;
    public boolean IsCold;

    public TChState(int index) {
        Index = index;
        Status = 0;
    }

    public String GetFireStatus()
    {
        switch (Status)
        {
            case 0:
                return "待测试";
            case 1:
                return "可点火";
            case 2:
                return "待点火";
            case 3:
                return "不可用";
            case 4:
                return "已点火";
        }
        return "错误状态";
    }
    private enum FireStatus{
        WaitingForTest("待测试",0),
        CanFire("可点火",1),
        WaitForFire("待点火",2),
        Disable("不可用",3),
        Fired("已点火",4);

        private int value;
        private String name;

        FireStatus(String name, int value)
        {
            this.name = name;
            this.value = value;
        }

        public String getName(){
            return name;
        }

    }
}
